<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="p" uri="/WEB-INF/tld/pagination.tld"%>  
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=UTF-8">
		<title>会计科目</title>
		<link rel="stylesheet" type="text/css" href="css/public.css">
		<script language="JavaScript" charset="UTF-8" src="js/public.js"></script>
		<script type="text/javascript" charset="UTF-8" src="js/date1.js"></script>
		<script type="text/javascript" charset="UTF-8" src="js/sorttable.js"></script>
		<script type="text/javascript" charset="UTF-8"src="js/checkboxSelect.js"></script>
		<script type="text/javascript">
			
		</script>
		
	</head>

	<body>
		<div id="info_all">
			<div id="info_top">
				会计科目
			</div>
			<!-- 主输入区 -->
			<!-- 功能按钮 -->
			<s:form action="selectMultiAccountbook.action" method="post" theme="simple" id="delrow">
				<div id="info_main">
					<!-- 查询栏 -->

					<div id="select">
						<hr>
						<table>
							<tr>
								<td>
									科目组&nbsp;
								</td>
								<td>
									<select id="s1"
										onChange="redirec(document.getElementById('s1').options.selectedIndex)"
										style="width: 96px;">
										<option selected>
											选择科目组
										</option>
										<option value="1">
											&nbsp;资&nbsp;产&nbsp;
										</option>
										<option value="2">
											&nbsp;负&nbsp;债&nbsp;
										</option>
										<option value="3">
											&nbsp;共&nbsp;同&nbsp;
										</option>
										<option value="4">
											&nbsp;权&nbsp;益&nbsp;
										</option>
										<option value="5">
											&nbsp;成&nbsp;本&nbsp;
										</option>
										<option value="6">
											&nbsp;损&nbsp;益&nbsp;
										</option>
										<option value="7">
											&nbsp;表&nbsp;外&nbsp;
										</option>
									</select>
									&nbsp;&nbsp;&nbsp;
								</td>
								<td>
									科目类别&nbsp;
								</td>
								<td>
									<select id="s2" style="width: 96px;">
										<option selected value="选择科目类别">
											选择科目类别
										</option>
									</select>
									&nbsp;&nbsp;&nbsp;
								</td>
								<td>
									科目代码&nbsp;
								</td>
								<td>
									<s:textfield name="pbaseAccountbook.accountbookCode" size="12"></s:textfield>

									&nbsp;&nbsp;&nbsp;
								</td>
								<td>
									科目名称&nbsp;
								</td>
								<td>
									<input type="text" name="pbaseAccountbook.accountbookName" size="12">
									&nbsp;&nbsp;&nbsp;
								</td>

							</tr>
						</table>

					</div>
					<div class="sele">
						<input type="submit" value="查询"
							onmouseover="this.className='btnover'"
							onmouseout="this.className='btnout'" id="btnsize" />
						<input type="reset" value="重置"
							onmouseover="this.className='btnover'"
							onmouseout="this.className='btnout'" id="btnsize"/>


						<hr>
					</div>
					<!-- 信息显示栏 -->
					<div id="info_info1">
						<table id="info_table" width="620px" cellspacing=1px
							cellpadding=1px class="sortable">
							<thead>
								<tr>
									<th width="80px">
										科目代码
									</th>
									<th width="150px">
										科目名称
									</th>
									<th width="70px">
										助记码
									</th>
									<th width="100px">
										科目类别
									</th>
									<th width="100px">
										余额方向
									</th>
									<th width="100px">
										外币核算
									</th>

									

								</tr>
							</thead>
							<tbody>
								<s:if test="!accountbookList.isEmpty()">
									<s:iterator value="accountbookList" status="stau">
										
										<tr ondblclick="multiChildToParent('accountbookId','<s:property value="accountBook.accountbookId"/>','accountbookName','<s:property value="accountBook.accountbookName"/>')">			
											<td>
												<s:property value="accountBook.accountbookCode" />
											</td>

											<td>
												<s:property value="accountBook.accountbookName" />
											</td>
											<td>
												<s:property value="accountBook.shortName" />
											</td>
											<td>
												<s:property value="bookType.typeName" />
											</td>
											<td>
												<s:if test="accountBook.banlanceDirection==1">
												借
											</s:if>
												<s:elseif test="accountBook.banlanceDirection==0">
												贷
											</s:elseif>
											</td>

											<td>
												<s:if test="accountBook.foreignCurrency==1">
												是
											</s:if>
												<s:elseif test="accountBook.foreignCurrency==0">
												否
											</s:elseif>
											</td>
										</tr>

									</s:iterator>
								</s:if>
								<s:else>
									<tr>
										<td></td>
									</tr>
								</s:else>
							</tbody>
							<tfoot>

							</tfoot>
						</table>
<s:if test="!accountbookList.isEmpty">
							<tr style="font-size: 12px;">

								<div align="center">
									<font color="#FF0000"> 共<s:property value="page.total" /> 页 第
										<s:property value="page.cpage" /> 页 <p:page cpage="%{page.cpage}"
											total="%{page.total}" url="%{page.url}" /> </font>

								</div>
							</tr>
						</s:if>
						<script language="javascript">  
						//("表格名称","奇数行背景","偶数行背景","点击后背景");
						 mouseclick("info_table","#ffffff","#ffffff","#e6f0fd");
						 //("表格名称","奇数行背景","偶数行背景");
						 //setcolor("t","#ffffff","#ffffff");
					</script>
						<script language="javascript">     
					//获取一级菜单长度     
					var select1_len = document.getElementById("s1").options.length;     
					var select2 = new Array(select1_len);     
					//把一级菜单都设为数组     
					for (i=0; i<select1_len; i++)     
					{ select2[i] = new Array();}     
					//定义基本选项     
					select2[0][0] = new Option("选择科目组", " ");     
					   //资产
					select2[1][0] = new Option("固定资产", " ");     
					select2[1][1] = new Option("流动资产", " ");     
					select2[1][2] = new Option("长期资产", " ");     
					   //负债
					select2[2][0] = new Option("流动负债", " ");     
					select2[2][1] = new Option("长期负债", " ");        
					   //共同
					select2[3][0] = new Option("衍生工具", " ");     
					select2[3][1] = new Option("套期工具", " ");     
					select2[3][2] = new Option("被套期项目", " "); 
					//权益
					select2[4][0] = new Option("所有者权益", " ");     
					//成本
					select2[5][0] = new Option("成本", " ");
					//损益
					select2[6][0] = new Option("营业收入", " ");     
					select2[6][1] = new Option("营业成本及税金", " ");     
					select2[6][2] = new Option("期间费用", " ");
					select2[6][3] = new Option("其他收益", " ");     
					select2[6][4] = new Option("其他损失", " ");     
					select2[6][5] = new Option("以前年度损益调整", " ");
					select2[6][6] = new Option("所得税", " ");
					//表外
					select2[7][0] = new Option("表外", " ");
					//联动函数     
					function redirec(x)     
					{  
		 
					var temp = document.getElementById("s2");     
					for (i=0;i<select2[x].length;i++)     
					{ temp.options[i]=new Option(select2[x][i].text,select2[x][i].value);}     
					}     
					</script>
					</div>
				</div>
			</s:form>
		</div>
	</body>
</html>

